package cn.ncupyh;

public class Phone {
    //属性
    private String brand;
    private int remaining;

    //

    public Phone(String brand, int remaining) {
        this.brand = brand;
        this.remaining = remaining;
    }

    public Phone() {
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getRemaining() {
        return remaining;
    }

    public void setRemaining(int remaining) {
        this.remaining = remaining;
    }

    //方法
    public void checkPower(){
        if(remaining <20){
            System.out.println("电量过低,请充电!");
        }
    }

}
